Re: IPv4 addresses, unsigned integers, space - Mailing list pgsql-general

From Jim Crate
Subject Re: IPv4 addresses, unsigned integers, space
Date
Msg-id r02000000-1026-FF198933B7E811D7A69D0003939CD378@[67.34.22.54]
Whole thread Raw
In response to IPv4 addresses, unsigned integers, space  (Florian Weimer <fw@deneb.enyo.de>)
Responses Re: IPv4 addresses, unsigned integers, space  (Florian Weimer <fw@deneb.enyo.de>)
List pgsql-general
on 7/15/03, Florian Weimer <fw@deneb.enyo.de> wrote:

>If I switched from signed integers to unsigned integers (and from INET
>to "real" IPv4 addresses, consisting of the relevant 32 bits only) I
>think I could save about 25% of my table size.

Why do you need unsigned ints to hold IP addresses?  Signed ints are also 32
bits wide and hold IPv4 addresses just fine.  What difference does it make if IP
addresses with a class A higher than 127 appear as negative numbers?

Here's a couple of convenience function that convert between integer and dotted
notation.  These functions work fine with the signed integers we have in
PostgreSQL.

<http://www.deepskytech.com/downloads/misc/ip_functions.txt>

--
Jim Crate
Deep Sky Technologies, Inc.

pgsql-general by date:

Previous
From: Joe Conway
Date:
Subject: Re: Where is the physical files of database that I just
Next
From: "James Moe"
Date:
Subject: Re: Anyone used pgHoster.com?